<template>
	<div>
		<bind-phone :create-accont="createAccont" :login-type="loginType" :return-url="returnUrl" @close-bind="isActive">
			<template #tips>
				是否绑定原账户
			</template>
		</bind-phone>
	</div>
</template>

<script>
	import bindPhone from '@/views/reg/components/bindPhone'
	import qs from 'qs'
	import mixin from '@/mixins/removeLoading'
	export default {
		name: 'AuthRedirect',
		components:{
			bindPhone	
		},
		data(){
			return{
				createAccont:true,
				active:false,
				loginType:undefined,
				returnUrl:undefined
			}
		},
		created() {
			this.loginType = this.$route.path.indexOf('qq') !== -1 ? 1:2
			let parsedUrl = qs.parse(window.location.href.split('?')[1])
			this.returnUrl = parsedUrl.return_url
		},
		mixins: [mixin],
		methods:{
			isActive(){
				this.active = !this.active
			}
		}
	}
</script>

<style>
</style>
